<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        for(var i=1;i<=3;i++){
            console.log('这是外层循环第'+i+'次');
            for(var j=1;j<=3;j++){
                console.log('这是内层循环第'+j+'次');
            }
        }

        var str='';
        for(var i=1;i<=5;i++){
            for(var j=1;j<=5;j++){
                str =str+'*'
            }
            str = str+'\n';
        }
        console.log(str);

        //打印n行n列的星星
        var rows = prompt("请您输入行数：");
        var cols = prompt('请您输入列数：');
        var str1='';
        for(var m=1;m<=rows;m++){
            for(var n=1;n<=cols;n++){
                str1 =str1+'*'
            }
            str1 = str1+'\n';
        }
        console.log(str1);

    

    </script>
</head>
<body>
    
</body>
</html>